import path from 'path'
import getBase from './utils/getBase'
import getBusiness from './utils/getBusiness'
const config = {
  title: '复软前端',
  description: '组件库',
  lastUpdated: true,
  head: [['link', { rel: 'icon', href: '/fr-logo.ico' }]],
  vite: {
    server: {
      host: '0.0.0.0',
      port: 8200,
      proxy: {
        '/api/v1': {
          target: 'http://10.11.10.205:7100',
          changeOrigin: true
        }
      }
    },
    resolve: {
      extensions: ['.js', '.jsx', '.json', '.vue'],
      alias: {
        '@': path.resolve(__dirname, '../../src')
      }
    }
  },
  markdown: {
    lineNumbers: true
  },
  themeConfig: {
    logo: 'fr-logo.png',
    nav: [
      { text: '首页', link: '/' },
      {
        text: '组件库',
        link: '/components/BaseButton'
      },
      {
        text: '前端规范',
        items: [
          { text: '组件使用规范', link: '/using-standards' },
          { text: '命名规范', link: '/name-standards' }
        ]
      },
      {
        text: 'git使用流程',
        link: '/git-standards'
      }
    ],
    sidebar: {
      '/components/': [
        {
          isGroup: true,
          text: '基础组件',
          items: getBase()
        },
        {
          isGroup: true,
          text: '业务组件',
          items: getBusiness()
        }
      ]
    },
    socialLinks: [{ icon: 'github', link: 'http://10.11.10.198/java/his-web' }],
    footer: {
      message: 'by wangzhen',
      copyright: 'Copyright © 2023 复软科技'
    },
    // search: {
    //   provider: 'algolia',
    //   options: {
    //     appId: '8J64VVRP8K',
    //     apiKey: 'a18e2f4cc5665f6602c5631fd868adfd',
    //     indexName: 'vitepress'
    //   }
    // },
    aside: false,
    outlineTitle: '本页目录',
    lastUpdatedText: '上次更新',
    docFooter: { prev: '上一篇', next: '下一篇' }
  }
}

export default config
